imcontextxim: Remove broken custom drawing code
authorBenjamin Otte <otte@redhat.com>
Fri, 3 Oct 2014 13:47:51 +0000 (15:47 +0200)
committerBenjamin Otte <otte@redhat.com>
Fri, 3 Oct 2014 13:51:45 +0000 (15:51 +0200)
Just use regular GtkWindow styling instead.

modules/input/gtkimcontextxim.c

index e2be5b0f99577c966dd8df85518a58ed1fe1e440..9a152b50608a5225942a78780dbd1419748842a8 100644 (file)
@@ -1701,34 +1701,6 @@ status_window_get (GtkWidget *toplevel)
   return status_window;
 }
 
-/* Draw the background (normally white) and border for the status window
- */
-static gboolean
-on_status_window_draw (GtkWidget *widget,
-                       cairo_t   *cr)
-{
-  GtkStyleContext *style;
-  GdkRGBA color;
-
-  style = gtk_widget_get_style_context (widget);
-
-  gtk_style_context_get_background_color (style, 0, &color);
-  gdk_cairo_set_source_rgba (cr, &color);
-  cairo_paint (cr);
-
-  gtk_style_context_get_color (style, 0, &color);
-  gdk_cairo_set_source_rgba (cr, &color);
-  cairo_paint (cr);
-
-  cairo_rectangle (cr, 
-                   0, 0,
-                   gtk_widget_get_allocated_width (widget) - 1,
-                   gtk_widget_get_allocated_height (widget) - 1);
-  cairo_fill (cr);
-
-  return FALSE;
-}
-
 /* Creates the widgets for the status window; called when we
  * first need to show text for the status window.
  */
@@ -1742,7 +1714,6 @@ status_window_make_window (StatusWindow *status_window)
   window = status_window->window;
 
   gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
-  gtk_widget_set_app_paintable (window, TRUE);
 
   status_label = gtk_label_new ("");
   g_object_set (status_label, "margin", 1, NULL);
@@ -1750,9 +1721,6 @@ status_window_make_window (StatusWindow *status_window)
   
   gtk_container_add (GTK_CONTAINER (window), status_label);
   
-  g_signal_connect (window, "draw",
-                   G_CALLBACK (on_status_window_draw), NULL);
-  
   gtk_window_set_screen (GTK_WINDOW (status_window->window),
                         gtk_widget_get_screen (status_window->toplevel));